import { RouteObject } from 'react-router/dist/lib/context'
import { Navigate } from 'react-router-dom';

import HomePage from '@/pages/HomePage'
import AddParkingLot from '@/pages/addParkingLot'
import AddfixedParkingSpace from '@/pages/addRegularParking'
import AddParkingType from '@/pages/addParkingType'
import AddUserManager from '@/pages/addUserManager'
import AddVehicleAccess from '@/pages/addNotes'
import AddVehicleMaintenance from '@/pages/addVehicleMaintenance'
import FixedParkingSpace from '@/pages/regularParking'
import Login from '@/pages/login'
import ParkingLot from '@/pages/parkingLot'
import ParkingType from '@/pages/parkingType'
import UserManager from '@/pages/userManager'
import VehicleAccess from '@/pages/notes'
import VehicleMaintenance from '@/pages/vehicleMaintenance'
import AddCars from '@/pages/addCars'
import Cars from '@/pages/cars'
import Statistics from '@/pages/statistics'
import AddAdmin from '@/pages/addAdmin'
import Admin from '@/pages/admin'
import StatisticsAll from '@/pages/statisticsAll'
import AddMaintenancer from '@/pages/addMaintenancer'
import Maintenancer from '@/pages/maintenancer'
import RepairList from '@/pages/repairList'
import Introduce from '@/pages/introduce'

export const routes: RouteObject[] = [
	{
		path: '/',
		element: <Navigate to={'/login'}></Navigate>
	},
	{
		path: '/login',
		element: <Login></Login>
	},
	{
		path: '/homePage',
		element: <HomePage></HomePage>,
		children: [
			{
				path: 'addParkingLot',
				element: <AddParkingLot></AddParkingLot>
			},
			{
				path: 'addfixedParkingSpace',
				element: <AddfixedParkingSpace></AddfixedParkingSpace>
			},
			{
				path: 'AddParkingType',
				element: <AddParkingType></AddParkingType>
			},
			{
				path: 'addUserManager',
				element: <AddUserManager></AddUserManager>
			},
			{
				path: 'addNotes',
				element: <AddVehicleAccess></AddVehicleAccess>
			},
			{
				path: 'addVehicleMaintenance',
				element: <AddVehicleMaintenance></AddVehicleMaintenance>
			},
			{
				path: 'fixedParkingSpace',
				element: <FixedParkingSpace></FixedParkingSpace>
			},
			{
				path: 'parkingLot',
				element: <ParkingLot></ParkingLot>
			},
			{
				path: 'ParkingType',
				element: <ParkingType></ParkingType>
			},
			{
				path: 'userManager',
				element: <UserManager></UserManager>
			},
			{
				path: 'notes',
				element: <VehicleAccess></VehicleAccess>
			},
			{
				path: 'vehicleMaintenance',
				element: <VehicleMaintenance></VehicleMaintenance>
			},
			{
				path: 'addCars',
				element: <AddCars></AddCars>
			},
			{
				path: 'cars',
				element: <Cars></Cars>
			},
			{
				path: 'statistics',
				element: <Statistics></Statistics>
			},
			{
				path: 'addAdmin',
				element: <AddAdmin></AddAdmin>
			},
			{
				path: 'admin',
				element: <Admin></Admin>
			},
			{
				path: 'allStatistics',
				element: <StatisticsAll></StatisticsAll>
			},
			{
				path: 'addMaintenancer',
				element: <AddMaintenancer></AddMaintenancer>
			},
			{
				path: 'maintenancer',
				element: <Maintenancer></Maintenancer>
			},
			{
				path: 'repairList',
				element: <RepairList></RepairList>
			},
			{
				path: 'introduce',
				element: <Introduce></Introduce>
			}
		]
	},
	{
		path: '*',
		element: <>404</>
	}
]


export default routes